﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;

namespace Client_Server_Interface
{
    public class XmlReaderHelper : IDisposable
    {
        private XmlReader _reader;

        private XmlReaderHelper()
        {
            
        }

        public static XmlReader CreateInstance(string xmlString)
        {
            return new XmlTextReader(new StringReader(xmlString));
        }

        public bool Read()
        {
            return _reader.Read();
        }

        public string CurrentElement()
        {
            return _reader.Name;
        }

        public string GetAttribute(string atrName)
        {
            return _reader.GetAttribute(atrName);
        }

        public void Dispose()
        {
            //throw new NotImplementedException();
        }
    }
}
